<!Doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<title></title>
	<style>
		#box{margin:10px;width:100px;height:200px;background:#afa;}
		#box1{margin:10px;width:150px;height:175px;background:#eaf;}

	</style>
</head>
<body>
	<div id="box"></div>
	<div id="box1"></div>
	<script>
		function GetElementAtt(id,Att){
			function $ (id) {
				return document.getElementById(id);
			}
			var obj = $(id);
			if(window.getComputedStyle){
				var objAtt = window.getComputedStyle(obj);
				return objAtt[Att];
			} else {
				var oAtt = obj.currentStyle;
				return oAtt[Att];
			}
		}
		var o = GetElementAtt('box','width');
		console.log(o);
	</script>
</body>
</html>